package com.one.apartmentsystem.app.controller;

import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONUtil;
import com.one.apartmentsystem.common.utils.Result;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 首页图片
 * @author mpk
 * @since 2024/8/12 09:58:48
 */
@CrossOrigin
@RequestMapping("/app/banner")
@RestController
public class BannerController {


    @PostMapping("/info/list")
    public Result getBannerList() {
        JSONArray objects = JSONUtil.parseArray("[\n" +
                "        {\n" +
                "            \"id\": 4,\n" +
                "            \"createTime\": \"2023-11-19 17:44:34\",\n" +
                "            \"updateTime\": \"2024-01-24 10:25:53\",\n" +
                "            \"iurl\": \"https://apartmentst.shaidian.vip/public/uploads/20240124/c1dce71a0fb54459a6556997eff74bfc_fang_index0.jpg\",\n" +
                "            \"aid\": \"9\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"id\": 3,\n" +
                "            \"createTime\": \"2023-10-27 09:07:37\",\n" +
                "            \"updateTime\": \"2024-01-24 10:26:09\",\n" +
                "            \"iurl\": \"https://apartmentst.shaidian.vip/public/uploads/20240124/8b52d6b7d6894e868663b77b1a1f85c9_fang_index1.jpg\",\n" +
                "            \"aid\": \"4\"\n" +
                "        }\n" +
                "    ]");
        return Result.ok(objects);
    }


}
